import request from '@/config/axios'

// 获取字典列表
export const getlistApi = (params:any) => {
  return request.get({ url: '/api/system/dict/type/list',params})
}
// 新增字典类型
export const addTypeApi = (data:any) => {
  return request.post({ url: '/api/system/dict/type',data:data})
}
// 修改字典类型
export const editTypeApi = (data:any) => {
  return request.put({ url: '/api/system/dict/type',data:data})
}
// 删除字典类型
export const deteleTypeApi = (id:any) => {
  return request.delete({ url: `/api/system/dict/type/${id}`})
}

// ---
// 获取字典数据列表
export const getdatalistApi = (params:any) => {
  return request.get({ url: '/api/system/dict/data/list',params})
}
// 新增字典类型
export const adddataTypeApi = (data:any) => {
  return request.post({ url: '/api/system/dict/data',data:data})
}
// 修改字典类型
export const editdataTypeApi = (data:any) => {
  return request.put({ url: '/api/system/dict/data',data:data})
}
// 删除字典类型
export const deteledataTypeApi = (id:any) => {
  return request.delete({ url: `/api/system/dict/data/${id}`})
}



// 获取字典type列表
export const getTypeListApi = (params:any) => {
  return request.get({ url: '/api/system/dict/data/type/'+params})
}

